import { http } from '@/utils/http'

type Result = {
  success: boolean
  data: Array<any>
}

/**
 * 微服务接口，获取当前路由
 */
export const getAsyncRoutes = () => {
  return http.request<Result>('get', '/system/menu/getRouters')
}

/**
 * 微服务接口，通过Ostype获取当前路由
 */
export const getAsyncRoutesByOSType = (osTypes: any) => {
  return http.request<Result>('get', `/system/menu/getRouters/${osTypes.join(',')}`)
}
